<?php

// No direct access to this file
defined('_JEXEC') or die;
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
class JFormFieldCategories extends JFormFieldList{
	protected $type = 'categories';
	protected function getOptions(){
		$db = JFactory::getDBO();
		//$query = new JDatabaseQuery;
		
		$options = array();
		$array_link = $_SESSION['ARRAY_LINK_WEB'];
		foreach($array_link  as $val) 
		{
			$options[] = JHtml::_('select.option',$val['id'], $val['text']);
		}
		
		$options = array_merge(parent::getOptions(), $options);
		return $options;
	}
	
}
